package it.unibo.imola.gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.wb.swt.SWTResourceManager;
import org.eclipse.swt.events.MouseWheelListener;
import org.eclipse.swt.events.MouseEvent;

public class EditorView extends ViewPart {
	
	public static final String ID = "it.unibo.imola.gui.editorview";
	
	private StyledText styledText = null;

	public EditorView() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public void createPartControl(Composite parent) {
		
		styledText = new StyledText(parent, SWT.BORDER | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL);
		styledText.setBottomMargin(10);
		styledText.setTopMargin(10);
		styledText.setRightMargin(10);
		styledText.setLeftMargin(10);
		styledText.setFont(SWTResourceManager.getFont("DejaVu Sans Mono", 10, SWT.NORMAL));
		styledText.setFocus();
	}

	/**
	 * @return the styledText
	 */
	public StyledText getStyledText() {
		return styledText;
	}

	@Override
	public void setFocus() {
	}

}
